package com.personal.system.controller.content.web;

import com.personal.common.result.Result;
import com.personal.system.service.sys.SysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/blog/v1/user")
@RestController
@Api(tags = "用户接口")
@RequiredArgsConstructor
public class ApiUserController {

    private final SysUserService userService;

    @RequestMapping(value = "selectUserInfoByToken",method = RequestMethod.GET)
    @ApiOperation(value = "根据token获取用户信息", httpMethod = "GET", response = Result.class, notes = "根据token获取用户信息")
    public Result selectUserInfoByToken(String token){
        return userService.selectUserInfoByToken(token);
    }


}
